package com.emp.test.springboottest.object;

import org.springframework.util.Assert;

public class YhdSysParam {

	private String  sessionKey;

	private YhdSysParam(String sessionKey) {
		super();
		this.setSessionKey(sessionKey);
	}
	
	public String getSessionKey() {
		return sessionKey;
	}

	public void setSessionKey(String sessionKey) {
		this.sessionKey = sessionKey;
	}

	public static final class Builder{
		private String  sessionKey;

		public String getSessionKey() {
			return sessionKey;
		}
		
		public Builder setSessionKey(String sessionKey) {
			this.sessionKey = sessionKey;
			return this;
		}
		
		public YhdSysParam build(){
			Assert.hasText(sessionKey, "sessionKey 不能为空");
			return new YhdSysParam(sessionKey);
		}
	}
	
	public static final Builder getBuilder() {
		return new Builder();
	}
}
